<table class="table_main" border="0">
	<tr>
		<td class="tekst" width="850" style="text-align: left">
			<h1>Mijn praktijk</h1>
			<p>&nbsp;</p>
			{if $cursussen|@count eq 0}
			<p>Er is (nog) geen cursus aangemaakt.</p>
			{else}
			<h2>Vorderingskaart voor {$cursusNameSelected} </h2><br/>
			<form id="lessenplannenblok" method="post" action="{$REQUEST_URI}">
			Bekijk de vorderingskaarten van pakket:
			<select name="cursusId" onchange="document.getElementById('lessenplannenblok').submit();">
			{section name="cursus" loop="$cursussen"}
			<option value="{$cursussen[cursus]->getId()}"{if $cursussen[cursus]->getId() == $cursusIdSelected} selected="selected"{/if}>{$cursussen[cursus]->getPakketNaam()}</option>
			{/section}
			</select>
			<input type="hidden" name="module" value="{$module}" />
			<input type="hidden" name="action" value="vorderingskaarten" />
			</form>
				<p>&nbsp;</p>
			{if count($items) > 0}
			{* display pagination header *}
		    <p>Vorderingen {$paginate.first}-{$paginate.last} van totaal {$paginate.total} worden weergegeven.</p>
		
		    {* display results *}
				<table cellpadding="1" cellspacing="0" border="1" width="100%" class="body">
					<thead>
						<th>Fase</th>
						{section name="gepland" loop="$items"}
							<th style="text-align:center">{$items[gepland]->Start|date_format:"%e %b %Y<br>%H:%M"} - {$items[gepland]->Stop|date_format:"%H:%M"}</th>
						{/section}
					</thead>
					<tbody>
						{assign var='fases' value=$vorderingkaart->getFases()}
						{section name="fase" loop="$fases"}
							{assign var='regels' value=$fases[fase]->getRegels()}
							{section name="regel" loop="$regels"}
							<tr>
								<td>{$fases[fase]->getNaam()} - {$regels[regel]->getNaam()}</td>
								{section name="item" loop="$items"}
									{section name="resultaat" loop="$resultaten"}
										{if $items[item]->getId() == $resultaten[resultaat]->getItem() && $regels[regel]->getId() == $resultaten[resultaat]->getRegel()}
											{assign var='resultValue' value=$resultaten[resultaat]->getResultaat()}
										{/if}
									{/section}
									<td style="text-align:center">{$resultValue}</td>
									{assign var='resultValue' value=''}
								{/section}
							</tr>
							{/section}
						{/section}
					</tbody>
				</table>
				<p>&nbsp;</p>
			    {* display pagination info *}
			    {paginate_prev id="items"} {paginate_middle id="items"} {paginate_next id="items"}
			
			    <p>&nbsp;</p>
			    <p>&nbsp;</p>
			  
			  {if $notities|@count > 0}
			  <h2>Notities voor {$cursusNameSelected}:</h2><br/>
			  <table cellpadding="5" cellspacing="0" border="1" width="100%" class="body">
			   <tr>
			   <th>Les</th>
			   <th>Notitie</th>
			   </tr>
				{section name="notitie" loop="$notities"}
					<tr>
					<td style="width:280px">{section name="i2" loop=$items}{if $items[i2]->getId() == $notities[notitie]->getItem()}{$items[i2]->Start|date_format:"%A %e %B %Y %H:%M"} - {$items[i2]->Stop|date_format:"%H:%M"}{/if}{/section}</td>
					<td>{$notities[notitie]->getNotitie()}</td>
					</tr>
				{/section}
				</table>
				{/if}
			{else}
			<p>Er is voor dit pakket geen vorderingskaart beschikbaar.</p>
			{/if}
			<p>&nbsp;</p>
			{/if}
		</td>
	</tr>
</table>
